<?php if (!defined('THINK_PATH')) exit();?><table class="table-grid table-multiple">
    <thead>
        <tr>
            <th class="col-idx"><a href="#" class="btn-arrowstop lnk-multiple" onclick="">&nbsp;</a></th>            
            <?php if($isSuperAdmin): ?><th>租户ID</th><?php endif; ?>
            <th>客户编号</th>
            <th>客户姓名</th>
            <th>电话号码</th>
            <th>联系地址</th>
            <th>购买次数</th>
            <th>累计消费</th>
            <th>上次购买时间</th>
            <th>工号</th>
            <th>状态</th>
            <th>创建时间</th>
            <th>操作</th>
        </td></tr>
    </thead>
    <tbody>
    <?php if(is_array($list)): foreach($list as $key=>$vo): if(is_numeric($key)): $key=$key+1; endif; ?><tr data-key="<?php echo ($vo["id"]); ?>">
            <td><?php echo ($key); ?></td>
            <?php if($isSuperAdmin): ?><td><?php echo ($vo["siteID"]); ?></td><?php endif; ?>
            <td><?php echo ($vo["serialNo"]); ?></td>
            <td><?php echo ($vo["personalName"]); ?></td>
            <td><?php echo ($vo["telphone"]); ?></td>
            <td><?php echo ($vo["address"]); ?></td>
            <td><?php echo ($vo["buyCount"]); ?></td>
            <td><?php echo ($vo["cumulativeAmount"]); ?></td>
            <td><?php echo ($vo["lastBuyTime"]); ?></td>
            <td><?php echo ($vo["userName"]); ?></td>
            <td><?php echo (sofn_get_state_text('user-state',$vo["state"])); ?></td>
            <td><?php echo ($vo["createdTime"]); ?></td>
            <td class="no-padding">
                <a href="<?php echo U('Customer/customer_edit','id='.$vo['id']);?>" class="btn-edit lnk-edit">编辑</a>                
        <?php if($upr['预约客户']): ?><a href="<?php echo U('Customer/appointment_edit','customerID='.$vo['id']);?>" class="btn-edit lnk-edit">预约</a><?php endif; ?>
        <?php if($upr['调度客户']): ?><a href="<?php echo U('Customer/dispatch_edit','customerID='.$vo['id']);?>" class="btn-edit lnk-edit">调度</a><?php endif; ?>
        <?php if($upr['删除客户']): ?><a href="<?php echo U('Customer/customer_delete','id='.$vo['id']);?>" class="btn-minus lnk-confirm">回收站</a><?php endif; ?>
        </td>
        </td></tr><?php endforeach; endif; ?>
</tbody>
</table>
<?php echo ($pager); ?>